﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using FxhjpgWeb.Model;
using System.Collections;
using FxhjpgWeb.Business;

namespace FxhjpgWeb.WebSite.en.UC
{
    public partial class righter : System.Web.UI.UserControl
    {
        Hashtable table = new Hashtable();
        protected IList<PhotoImgs> photoImgsList = new List<PhotoImgs>();
        IPhotoImgsBusiness photoBll = new PhotoImgsBusinessFactory().CreatePhotoImgsBusiness();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(Request.QueryString["t"]))
            {
                int id = 0;
                switch (Request.QueryString["t"])
                {
                    case "pfdn":
                        id = 2;
                        break;
                    case "ylx":
                        id = 3;
                        break;
                    case "sstj":
                        id = 4;
                        break;
                }
                if (id > 0)
                {
                    table.Add(PhotoImgsHash.TopNum, 6);
                    table.Add(PhotoImgsHash.CId, id);
                    table.Add(PhotoImgsHash.OrderField, "Sort,P_Id");
                    table.Add(PhotoImgsHash.OrderDirection, "asc");
                    photoImgsList = photoBll.GetAllPhotoImgs(table);
                }
            }
        }
    }
}